package com.zyl.blog.common.analyzer;

import com.zyl.blog.common.service.ITreeNode;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

/**
 * @version v1.0
 * @ProjectName: Personal_Blog
 * @Package: com.zyl.common.analyzer
 * @ClassName: TreeDiffAnalyzer
 * @Description: 树结构差异分析器
 * @Author FinalFantasy
 * @Date 2025/2/19-10:16
 */
public class TreeDiffAnalyzer {
    public static <T extends Serializable> DiffResult<T> compareTrees(
            List<ITreeNode<T>> oldTree,
            List<ITreeNode<T>> newTree
    ) {
        // 暂未实现树结构的增删改变化检测，未来扩展
        return null;
    }

    public record DiffResult<T>(
            Set<T> addedNodes,
            Set<T> removedNodes,
            Set<T> modifiedNodes
    ) {}

}
